package com.macro.mall.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 郎
 */
@Getter
@Setter
public class SmsDictionary implements Serializable {
    @ApiModelProperty(value = "ID")
    private Long id;

    @ApiModelProperty(value = "字典编码")
    private String code;

    @ApiModelProperty(value = "字典名称")
    private String name;

    @ApiModelProperty(value = "父ID")
    private Long pid;

    @ApiModelProperty(value = "字典项说明")
    private String remark;

    @ApiModelProperty(value = "字典图标样式")
    private String icon;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastModifiedTime;

    private static final long serialVersionUID = 1L;


    @Override
    public String toString() {
        return getClass().getSimpleName() +
                " [" +
                "Hash = " + hashCode() +
                ", id=" + id +
                ", code=" + code +
                ", name=" + name +
                ", pid=" + pid +
                ", remark=" + remark +
                ", icon=" + icon +
                ", sort=" + sort +
                ", createTime=" + createTime +
                ", lastModifiedTime=" + lastModifiedTime +
                ", serialVersionUID=" + serialVersionUID +
                "]";
    }
}